package com.jy.rhin.infra.repo.notfication.topic.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jy.rhin.domain.notification.topic.entity.TopicPropertiesVO;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author WeiQ
 * @date 2022/7/4 13:54
 */
@Data
@TableName("t_notification_topic_properties")
@NoArgsConstructor
public class TopicPropertiesPO {

    public TopicPropertiesPO(TopicPropertiesVO vo, String topicExp) {
        this.topicExp = topicExp;
        this.className = vo.getClassName();
        this.sourcePath = vo.getSourcePath();
        this.targetPath = vo.getTargetPath();
        this.propertyDesc = vo.getPropertyDesc();
    }

    @TableId
    private Long id;
    /**
     * 主题id
     */
    @TableField("topic_exp")
    private String topicExp;
    /**
     * 类名
     */
    @TableField("class_name")
    private String className;
    /**
     * xml路径
     */
    @TableField("source_path")
    private String sourcePath;
    /**
     * 目标路径
     */
    @TableField("target_path")
    private String targetPath;
    /**
     * 属性说明
     */
    @TableField("property_desc")
    private String propertyDesc;

}
